<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8" />
    <title>文件上传模块信息定义</title>
    <link rel="stylesheet" type="text/css" href="https://cdn.staticfile.org/twitter-bootstrap/4.4.1/css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="/static/basic/plugins/easyui/themes/bootstrap/easyui.css">
	<link rel="stylesheet" type="text/css" href="https://cdn.staticfile.org/font-awesome/5.12.1/css/all.min.css" >
	<link rel="stylesheet" type="text/css" href="/static/m.css?v=6" >
</head>
<body>
<div id="window-mmask" class="window-mmask" ><div class="window-mmask-msg" >页面加载中,请稍候...</div></div>
<div class="easyui-layout" data-options="fit:true"  >
	<div data-options="region:'center'" >
		<table id="gridList" ></table>
	</div>
</div>

<div id="searchbar">
<div class="maction">
		<a href="javascript:void(0)" id="addButton" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-add'">新增</a>
			<a href="javascript:void(0)" id="editButton" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-edit'">编辑</a>
            <a href="javascript:void(0)" id="cancelEditButton" class="easyui-linkbutton" data-options="plain:true" >取消当前行编辑</a>
            <a href="javascript:void(0)" id="endEditingButton" class="easyui-linkbutton" data-options="plain:true" >结束当前行编辑</a>
            <a href="javascript:void(0)" id="rejectButton" class="easyui-linkbutton" data-options="iconCls:'icon-undo',plain:true" >撤销</a>
			<a href="javascript:void(0)" id="removeButton" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-remove'">删除</a>
			<a href="javascript:void(0)" id="saveButton" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-save'">保存</a>
</div>
<form id="searchForm" >
	<a id="searchButton" href="javascript:void(0)" class="easyui-linkbutton" data-options="plain:true,iconCls:'fas fa-search mbutton'" >查询</a>
</form>
</div>

<script src="https://cdn.staticfile.org/jquery/3.4.1/jquery.min.js"></script>
<script src="/static/basic/plugins/easyui/jquery.easyui.min.js"></script>
<script src="/static/init.js?v=1"></script>
<script src="/static/basic/plugins/easyui/locale/easyui-lang-zh_CN.js"></script>	
<script src="/static/searchEdit.js?v=3"></script>
<!-- <script src="https://cdn.staticfile.org/moment.js/2.24.0/moment.min.js"></script> -->
<script>
var options={
		page_id:64,
		grid_id:"gridList",
		pager_id:"pager",
		sqlname:"grid_64_sys_pub_file"
	};
	//document ready
	$(function(){
		grid1=new uniontrip.datagrid.searchEdit(options);
		
		$('#searchButton').bind('click',grid1.load);//查询操作绑定事件
		$('#addButton').bind('click', addRow);//新增行绑定事件
		$('#editButton').bind('click',grid1.editRow);//编辑按钮绑定事件
		$('#removeButton').bind('click',grid1.remove);//删除行绑定事件
		$('#saveButton').bind('click', grid1.accept);//保存datagrid绑定事件
		$('#cancelEditButton').bind('click',grid1.cancelEditing);//取消行编辑绑定事件
		$('#endEditingButton').bind('click', grid1.endEditing);//结束行编辑绑定事件
		$('#rejectButton').bind('click', grid1.rejectChanges);//撤销编辑绑定事件		
	    $('#showChangesButton').bind('click',grid1.showChanges);//信息变更提示
	    //初始化搜索框
	    initsearch();
	});

	/**
	 * 新增一行
	 */
	function addRow(){
		//var newRowData={id:guid(),creator_id:sessionuser.id,creator_name:sessionuser.nickname,create_time:moment().format('YYYY-MM-DD')};//初始化行数据
		grid1.grid.datagrid('append',{id:guid()});	
	}
	/**
	 * 初始化搜索条件
	 */
	function initsearch(){
		/*$('#search-product_class_id').combotree({
			icons: [{
				iconCls:'icon-clear',
				handler:function(){
					$('#search-product_class_id').combotree('clear');
				}
			}],
		    data:grid1.combotreeDatas.product_class_id
		});
		//初始化combobox例子
		$('#search-status').combobox({
			panelHeight:'auto',
			editable:false,
			valueField:'code_value',
			textField:'code_name',
			icons: [{
				iconCls:'icon-clear',
				handler:function(){
					$('#search-status').combobox('clear');
				}
			}],
		    data:grid1.comboboxDatas.status
		});*/
	}
</script>
</body>
</html>